<template>
  <div>
    <div class="right">
      <div class="right-bottom">
        <h4>标签</h4>
        <div class="tage">
          <p class="right-tage" v-for="item in tage" :key="item.id">
            {{ item.name }}
          </p>
        </div>
      </div>
    </div>
    <div class="right"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tage: {},
    };
  },
  created() {
    this.getage();
  },
  methods: {
    async getage() {
      let res = await this.$axios.post("/api/tag/list");
      this.tage = res.data.data;
      console.log(res);
    },
  },
};
</script>

<style scoped>
.boxs {
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}
.right {
  width: 285px;
  padding: 15px;
}

.tage {
  display: flex;
  flex-wrap: wrap;
}
.tage p {
  display: inline-block;
  width: auto;
  margin: 5px;
  padding: 5px;
  font-size: 12px;
  text-align: center;
  background-color: rgb(188 240 218);
  color: rgb(1 71 55);
  border-radius: 5px;
}
.tage p:hover {
  color: rgb(0, 52, 40);
  background: #09977f;
}
.right-bottom {
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  width: 217px;
  margin-left: -10px;
}
</style>